package cn.hotel.mapper;

import cn.hotel.entity.Worker;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
public interface WorkerMapper {
    //根据员工姓名与对应的密码登陆
    Worker queryUserByUserAndPass(@Param("username") String username,@Param("password") String password);
    //查询所有的工作人员信息
    List<Worker> getAllWorkers();

    public Worker queryWorkerByUserAndPass(@Param("username") String username , @Param("password") String password);

    //新增员工信息
    void insertWorkerInfo(Worker worker);

    //通过员工id查询员工信息
    Worker queryWorkerInfo(int workerId);

    //更新员工信息
//    void updateWorkerInfo(Worker worker);

    //删除员工信息
    void deleteWorkerInfo(int workerId);

    //更新员工的信息
    int updateWorker(Worker worker);

}
